package com.binest.winnersList.service.impl;

import java.util.List;
import com.binest.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.binest.winnersList.mapper.WinnersListMapper;
import com.binest.winnersList.domain.WinnersList;
import com.binest.winnersList.service.IWinnersListService;

/**
 * 获奖名单Service业务层处理
 * 
 * @author binest
 * @date 2024-01-19
 */
@Service
public class WinnersListServiceImpl implements IWinnersListService 
{
    @Autowired
    private WinnersListMapper winnersListMapper;

    /**
     * 查询获奖名单
     * 
     * @param id 获奖名单主键
     * @return 获奖名单
     */
    @Override
    public WinnersList selectWinnersListById(String id)
    {
        return winnersListMapper.selectWinnersListById(id);
    }

    /**
     * 查询获奖名单列表
     * 
     * @param winnersList 获奖名单
     * @return 获奖名单
     */
    @Override
    public List<WinnersList> selectWinnersListList(WinnersList winnersList)
    {
        return winnersListMapper.selectWinnersListList(winnersList);
    }

    /**
     * 新增获奖名单
     * 
     * @param winnersList 获奖名单
     * @return 结果
     */
    @Override
    public int insertWinnersList(WinnersList winnersList)
    {
        winnersList.setCreateTime(DateUtils.getNowDate());
        return winnersListMapper.insertWinnersList(winnersList);
    }

    /**
     * 修改获奖名单
     * 
     * @param winnersList 获奖名单
     * @return 结果
     */
    @Override
    public int updateWinnersList(WinnersList winnersList)
    {
        winnersList.setUpdateTime(DateUtils.getNowDate());
        return winnersListMapper.updateWinnersList(winnersList);
    }

    /**
     * 批量删除获奖名单
     * 
     * @param ids 需要删除的获奖名单主键
     * @return 结果
     */
    @Override
    public int deleteWinnersListByIds(String[] ids)
    {
        return winnersListMapper.deleteWinnersListByIds(ids);
    }

    /**
     * 删除获奖名单信息
     * 
     * @param id 获奖名单主键
     * @return 结果
     */
    @Override
    public int deleteWinnersListById(String id)
    {
        return winnersListMapper.deleteWinnersListById(id);
    }
}
